﻿namespace CommonFramework.Serialize.BytesArray.Private
{
    /// <summary>
    /// 能提供字节数组容器
    /// </summary>
    internal interface IBytesProvider
    {
        byte[] CurrentBytes();

        byte[] WriteBytesView();
        int WriteIndex { get; set; }

        byte[] ReadBytesView();
        int ReadIndex { get; set; }

        int DataLength();
        int TotalLength();
        int RemainLength();

        void ExtendSizeTo(int newSize);
        void MoveDataToOrigin();
    }
}